﻿<%@ Page Title="" Language="C#" MasterPageFile="~/edit/Admin.Master" AutoEventWireup="true" CodeBehind="TemplateEdit.aspx.cs" Inherits="ChgDoc.Edit.TemplateEdit"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>


<asp:Content ID="Content2" ContentPlaceHolderID="pageContent" runat="server">
<script type="text/javascript">
    $(document).ready(function () {

        $('.catchtab').live('keydown', function (e) {
            var keyCode = e.keyCode || e.which;

            if (keyCode == 9) {
                var myValue = "\t";
                var startPos = this.selectionStart;
                var endPos = this.selectionEnd;
                var scrollTop = this.scrollTop;
                this.value = this.value.substring(0, startPos) + myValue + this.value.substring(endPos, this.value.length);
                this.focus();
                this.selectionStart = startPos + myValue.length;
                this.selectionEnd = startPos + myValue.length;
                this.scrollTop = scrollTop;

                e.preventDefault();
            }
        });
    });

</script>
<style>
.catchtab { font-family: Monospace; padding: 5px; color: #333;}
</style>
<asp:literal id="litErrors" runat="server" />
<table cellspacing="0" cellpadding="0" border=0 width="100%" height="100%" style="border-left: 1px solid #999; border-top:1px solid #999;">
    <tr class="gray" >
        <td >
            <div style="padding:5px;">
	    	Name: <asp:textbox id="txtName" runat="server" /> &nbsp;
            Subtemplate: <asp:CheckBox ID="chkSubtemplate" runat="server" />
            Render: <asp:DropDownList ID="drpList" runat="server" AutoPostBack="false" />
            </div>
        </td>
    </tr>
    <tr>
        <td height="100%" valign="top">
            <asp:textbox id="txtBody" runat="server" textmode="multiline" rows=2 style="width:99%; height:100%" class="catchtab" />
        </td>
    </tr>
</table>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPageButtons" runat="server">
    <asp:button id="btnSave" runat="server" text="Save" onclick="btnSave_click" Style="margin: 0px 5px 0px 10px;" class="ui-state-default" />  
    <asp:button id="btnSaveView" runat="server" text="Save+View" onclick="btnSaveView_click" Style="margin: 0px 10px 0px 5px;" class="ui-state-default" />  
</asp:Content>